Non-volatile semiconductor memory with a function for preventing unauthorized reading

ABSTRACT

A non-volatile memory comprises: a memory cell array for storing data; a decryption circuit for decrypting data read from the memory cell array using a prescribed computing process; and a decryption control circuit for, in response to a decryption command supplied from outside, activating the decryption circuit during a read operation. During writing time in the abovementioned memory, a user who is authorized to write data to memory and then read the data writes encoded (for example, inverted) data to certain address, and writes data which are not encoded (not inverted) to an address other than that. If the user is authorized, then the user knows the encoded addresses and non-encoded addresses, and therefore the user can give a decryption command when reading data from the encoded addresses during reading time, thereby activating the decryption circuit stored in the device such that the decrypted data can be outputted.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to rewritable non-volatile memory, and more particularly to non-volatile semiconductor memory having a function for preventing unauthorized reading.

[0003] 2. Description of the Related Art

[0004] Rewritable non-volatile semiconductor memory is widely used as memory for storing programs and data (hereinafter “contents”). Since the contents are retained even when the power is off, such memory is widely used in portable telephones, portable information terminals and the like.

[0005] Users who purchase non-volatile memory write contents which they want to store thereto, and then use a program-protect or erase-protect function to place the memory in a protected state so that the contents are not mistakenly erased or altered thereafter. Such a protect function can prevent the modification of stored contents.

[0006] The contents which users store to memory have their own intrinsic value, such as a game program, and consequently the unauthorized copying thereof is undesirable. Conventional non-volatile memory, however, has the abovementioned write-protect function, but does not have a function to prohibit reading. This is because the functioning of the memory requires the stored contents to be freely read. As a result, even contents having value may be read without authorization and copied to other memory.

[0007] For example, in a game device having memory storing a game program, the value of the device sometimes consists mostly in the game program. In such a case, when the game program is copied to other memory through unauthorized copying such as that discussed above, it becomes possible to manufacture the game device at a low cost, and the damage therefrom becomes great. Consequently, a function to prevent unauthorized reading of the contents in the memory is required.

SUMMARY OF THE INVENTION

[0008] It is an object of the present invention to provide non-volatile memory wherein only authorized users can read content normally.

[0009] It is another object to the present invention to provide memory in which unauthorized reading is impossible.

[0010] In order to achieve the abovementioned objects, the present invention is a non-volatile memory comprising: a memory cell array for storing data; a decryption circuit for decrypting data read from the memory cell array using a prescribed computing process; and a decryption control circuit for, in response to a decryption command supplied from outside, activating the decryption circuit during a read operation.

[0011] During writing time in the abovementioned memory, a user who is authorized to write data to memory and then read the data writes encoded (for example, inverted) data to certain address, and writes data which are not encoded (not inverted) to an address other than that. If the user is authorized, then the user knows the encoded addresses and non-encoded addresses, and therefore the user can give a decryption command when reading data from the encoded addresses during reading time, thereby activating the decryption circuit stored in the device such that the decrypted data can be outputted. The user can also output the data as is without decryption when reading data from a non-encoded address. As a result, normal data reading is possible. On the other hand, in the case of unauthorized reading, normal data reading is not possible because an unauthorized user cannot know the address to which encoded data are written.

[0012] In a more preferable embodiment of the abovementioned aspect, the decryption control circuit is constituted so as to be able to store addresses subject to decryption, which are supplied from outside, in response to a decryption command. At the time of reading, the decryption control circuit activates the abovementioned decryption circuit when the read address matches the address subject to decryption, and deactivates this circuit when these addresses do not match. The decryption control circuit is constituted so as to be able to write the address subject to decryption.

[0013] In the abovementioned preferred embodiment, the address subject to decryption, which can only be known to an authorized user, is stored by the decryption control circuit. The decryption circuit can only be activated when the address subject to decryption matches the accessed address, and only an authorized user can read data normally. With this method, the decryption control circuit can automatically control encoding and decoding if the address subject to decryption is stored at the start of, or at a prescribed time during, the read operation.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014]FIG. 1 is a constitutional diagram of the non-volatile semiconductor memory device in the embodiment;

[0015]FIG. 2 is a drawing showing a specific example of the decryption circuit;

[0016]FIG. 3 is a drawing showing a specific example of the decryption control circuit;

[0017]FIG. 4 is a drawing showing the relationship between the command sequence and the address and data in the corresponding write cycle;

[0018]FIG. 5 is a timing chart of a normal read operation;

[0019]FIG. 6 is a timing chart of a read operation in the decryption mode;

[0020]FIG. 7 is a drawing showing a structural example of the memory cell array which is subject to the read operation in this embodiment;

[0021]FIG. 8 is a drawing showing a first example of read operation control for the example in FIG. 7;

[0022]FIG. 9 is a drawing showing a second example of read operation control for the example in FIG. 7;

[0023]FIG. 10 is a drawing showing a third example of read operation control for the example in FIG. 7; and

[0024]FIG. 11 is a constitutional diagram of a memory system relating to this embodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0025] A preferred embodiment of the present invention is explained below with reference to the drawings. However, the scope of the present invention is not limited by the following embodiment and extends to the invention noted in the claims and items equivalent thereto.

[0026]FIG. 1 is a constitutional diagram of the non-volatile semiconductor memory device in the embodiment. This memory device comprises a command buffer 10 for inputting a command signal CMD supplied from outside, an address buffer 12 for inputting an address ADD, a data input buffer 30, and a data output buffer 28. Commands and data are supplied to the memory control circuit 14. The memory control circuit 14 decodes these commands and data and performs the necessary control of the memory. Typical control includes control of the read circuit 16, erase circuit 18, and program circuit 20, and this control is performed in response to read commands, erase commands, and program commands.

[0027] Although not shown, the memory cell array MCA is divided into a plurality of sectors and comprises a plurality of non-volatile memory cells in each sector. These may be any type of memory cell that is a rewritable memory cell, wherein stored data can be retained even when power is off, such as cells having floating gates or cells having capacitors comprising ferroelectric materials. The address Add inputted by the address buffer 12 is supplied to a decoder 21 through an address latch circuit 22, and the word line and sector in the cell array are selected.

[0028] When the sector and word line therein are selected, data in the memory cell are supplied to a sense amplifier SA through the bit line and detected. In the present embodiment, a decryption circuit 26 is provided between the sense amplifier SA and an output buffer 28. This decryption circuit 26 is activated or deactivated by a control signal S24 from the decryption control circuit 24.

[0029] A command Cmd from outside is supplied through the memory control circuit 14 to the decryption circuit 24, and an address Add from outside, such as a sector address, is supplied thereto through the address buffer 12.

[0030] During the writing of data to the memory, the user performs an encoding operation for data with the desired logic and writes the data to a sector of certain address, then writes non-encoded data in its current state to sectors of other addresses. Consequently, the user is in a position of knowing which addresses have encoded data and which have uncoded data.

[0031]FIG. 2 is a drawing showing a specific example of the decryption circuit. In this example, data inversion is performed as the encoding operation when data are written to the memory cell array. Consequently, an inverter 31 is provided as the decryption operation circuit in the decryption circuit. The data Dout from the sense amplifier SA are inputted to the inverter 31 of the decryption operation circuit. The output of the inverter 31 is output to the output buffer 28 through a transistor 32 which conducts when the activation signal S24, outputted by the decryption control circuit 24, is high. Also, when the decryption activation signal S4 is low, the transistor 34 conducts and the data Dout from the sense amplifier SA is supplied without further processing to the output buffer 28.

[0032]FIG. 3 is a drawing showing a specific example of the decryption control circuit. This decryption control circuit 24 comprises: a sector address memory 40 for storing sector addresses necessary for decryption; an entry/exit control circuit 42 for controlling the entry to and exit from the decryption mode; and an address comparing circuit 44 for comparing the sector address SCAdd stored in the sector address memory 40 with the sector address Add supplied from outside, and outputting a high decryption control signal S24 when those sector addresses match.

[0033] When the decryption mode signal DMode generated in response to a command to enter the decryption mode is in an activated state, the address comparing circuit 44 compares the abovementioned addresses, sets the control signal S24 to the high level when the addresses match, and sets the control signal S24 to the low level when the addresses do not match. Also, the address comparing circuit 44 sets the control signal S24 to the low level regardless of the comparison of the addresses when the decryption mode signal DMode becomes deactivated in response to a command to exit from the decryption mode.

[0034] The operations of the decryption control circuit 24 and the decryption circuit 26 in FIGS. 2 and 3 will be explained next. FIG. 4 is a drawing showing the relationship between the command sequence and the address and data in the corresponding write cycle. FIG. 5 is a timing chart during normal reading, and FIG. 6 is a timing chart during reading in the decryption mode.

[0035] In the normal read operation shown in FIG. 5, the write enable signal/WE enters a deactivated state (High), whereupon the address is supplied and the read cycle is entered. When the chip enable signal/CE enters an activated state (Low), the supplied address is inputted and the read operation begins. Then, when the output enable signal/OE enters an activated state (Low), data which are not encrypted are outputted from the output buffer 28. In a normal read operation, the decryption mode is not entered, and therefore the decryption circuit 26 outputs data read from the memory cell array without decrypting the data.

[0036] During a read operation in the decryption mode shown in FIG. 6, the chip enable signal/CE first enters an activated state (Low), and an address supplied from outside, such as a sector address, is downloaded. When the write enable signal/WE then enters an activated state (Low), the write cycle begins. At this time, when the entry command “60H” is inputted from the data input terminal, the memory control circuit 14 supplies the entry command to the decryption control circuit 24. In response thereto, the entry/exit control circuit 42 in the decryption control circuit 24 sets the set/reset signal S/R to high level, and stores the sector address Add supplied from outside to the sector address memory 40. The sector address memory 40 is SRAM or DRAM, for example, which can retain data only while power is on. Also, the entry/exit control circuit 42 places the decryption mode signal DMode in an activated state.

[0037] Thereafter, when the write enable signal/WE enters a deactivated state (High), the read cycle begins. An address is supplied from outside and data in the memory cell are read. The sector address Add supplied from outside is compared to the sector address subject to decryption, which is stored in the sector address memory 40, by the address comparing circuit 44. The decryption control signal S24 is controlled so as to be high when the addresses match, and low when the addresses do not match.

[0038] Accordingly, in the read operation in the decryption mode, when the input address is a sector address subject to decryption, the data which are then read are decrypted by the decryption circuit 26, inverted (in this example), and the decrypted (inverted) data are outputted. Also, when the input address is not a sector address subject to decryption, the data which are then read are outputted in their current state without being decrypted. Consequently, when an authorized user reads the data, the data can be read normally.

[0039] When the read cycle ends and the write enable signal/WE enters the activated state (Low), the write cycle begins once more and at this time, when the exit command “70H” is inputted from the data input terminal, the memory control circuit 14 supplies the exit command to the decryption control circuit 24. In response thereto, the entry/exit control circuit 42 in the decryption control circuit 24 sets the set/reset signal S/R to low level, resets the sector address memory 40, automatically overwrites 0 to all memory cells, and erases the stored sector address Add. Furthermore, the decryption mode signal DMode enters the deactivated state, and the address comparing circuit 44 in the decryption control circuit 24 sets the decryption control signal 24 low regardless of the address. As a result, the memory device is caused to exit from the decryption mode.

[0040] Even when the sector address memory 40 can maintain the addresses subject to decryption due to backup power or the like, resetting the sector address memory 40 upon exiting the decryption mode can prevent subsequent unauthorized access. Normally, the memory is controlled by the CPU and memory controller. Consequently, when a memory device containing a game program is installed in a game device, the memory device is cause to enter the decryption mode by the CPU or memory controller and the sector addresses subject to decryption are written thereto. Consequently, normal data reading through subsequent unauthorized access can be prevented by erasing the sector addresses subject to decryption by exiting the decryption mode.

[0041]FIG. 7 is a drawing showing a constitutional example of a memory cell array which is subject to the read operation in the present embodiment. This memory cell array MCA is divided into four sectors SEC0 through SEC3. The user writes encoded data to sectors SEC0 and SEC2 in this memory cell array and writes non-encoded data to sectors SEC1 and SEC3.

[0042]FIGS. 8, 9, and 10 are drawings showing examples of the read operation control for the example in FIG. 7. In each drawing, the changes in the operating mode are shown with respect to time on the horizontal. All examples show a case in which sectors SEC0, SEC1, SEC3, and SEC2 are read in succession.

[0043] In the read control example (1) in FIG. 8, the decryption mode entry command and the address subject to decryption are inputted when reading a sector subject to decryption, the address is stored, and the decryption mode is entered. After the reading of the sector is finished, the decryption mode exit command and address subject to decryption are inputted, the address is erased, and the decryption mode is exited.

[0044] Consequently, before reading the sector SEC0 initially, the entry command and its sector address are inputted, the sector address is written to the sector address memory 40, and the decryption mode is entered. After the read operation is performed for the sector SEC0, the exit command and its sector address are inputted, so that the sector address is erased from the sector address memory 40, and the decryption mode is exited. Thereafter, sectors SEC1 and SEC3 are read with a normal read operation. Finally, for the sector SEC2, the entry command and its sector address are inputted, the decryption mode is entered, and after the sector SEC2 is read, the exit command and sector address are inputted and the decryption mode is exited.

[0045] Because the authorized user who wrote data to memory knows the sectors to which encoded data were written, the decryption mode is entered before reading those sectors, the decryption circuit is activated, so that normal data can be read. Because an unauthorized user does not know the sectors to which encoded data were written, normal data cannot be read.

[0046] In the second read control example (2) in FIG. 9, the address of the sector subject to decryption is initially stored and then all sectors are read in the decryption mode. In the decryption mode, the decryption control circuit 24 compares the stored address of the sector subject to decryption with the address supplied from outside, and the decryption control signal S24 enters the activated state (High) only when those addresses match. Therefore, as shown in FIG. 8, it is not necessary to repeat entry and exit before and after reading the sectors subject to decryption.

[0047] As shown in FIG. 9, the entry command and address of the sector SEC0 are inputted first, and then the address of the sector SEC0 is written to the sector address memory 40. The entry command and address of the sector SEC2 are then inputted and this address is also written. Thereafter, the read operation is performed for sectors SEC0, SEC1, SEC3, and SEC2 in succession. The address comparing circuit 44 in the decryption control circuit 24 activates the decryption control signal S24 and causes the decryption of the read data only when the input address matches the stored address of the sector subject to decryption. Normal data can be read accordingly.

[0048] When all read operations are complete, the exit command and sector address are each inputted, the sector address is reset, and the decryption mode is exited.

[0049]FIG. 10 shows an example of a case where the decryption control circuit 24 does not have a sector address memory or an address comparing circuit. Specifically, the decryption control circuit 24 sets the decryption control signal S24 to an activated state (High) in response to the entry command, and sets this signal to a deactivated state (Low) in response to the exit command.

[0050] Consequently, in the read control example (3) in FIG. 10, the entry command is inputted before the read operation of the sector subject to decryption, and the decryption mode is entered. In the decryption mode, all data read are decrypted by the decryption circuit and outputted. When the reading of sectors subject to decryption is ended, the exit command is inputted before the reading of sectors not subject to decryption. In response thereto, the decryption mode is canceled and the normal read mode is entered. Data read thereafter are output without decryption. In this case, the input of the sector address at the time of entry and exit is not especially necessary.

[0051] As shown in FIG. 10, entry commands are inputted before the reading of each of the sectors SEC0 and SEC2, and exit commands are inputted once the read operation is complete and before the reading of the sectors SEC1 and SEC3.

[0052] In the read operation example (3) in FIG. 10, the sector address subject to decryption is not stored in the memory 40, and this is convenient for preventing unauthorized copying. Specifically, because the authorized user must input an entry command before reading sectors subject to decryption and an exit command before reading sectors other than those subject to decryption, control during reading becomes complicated. However, because a sector address memory is not present and will not therefore be left in a state where addresses subject to decryption are mistakenly stored, it will be very difficult for persons attempting unauthorized access to read data normally.

[0053] In the abovementioned embodiment, the decryption circuit 26 may perform the decryption operation for all bits of data read from the memory cell array, or may perform the decryption operation for only some of the bits. Also, it is possible to vary the location of bits for which the decryption operation is performed for each sector address subject to decryption. In this case, the decryption entry command includes data specifying which bits are subject to decryption. Unauthorized copying is made more difficult thereby.

[0054] Also, the decryption circuit 26 may comprise a plurality of different types of decryption operating circuits, such that any of the decryption operating circuits may be activated for an address subject to decryption. In this case, the decryption entry command includes a selection signal for selecting one of the decryption operating circuits. The corresponding decryption operating circuit is activated in response to that selection signal. Unauthorized copying is made more difficult thereby.

[0055] Also, in the abovementioned embodiment, the decryption control circuit 24 and decryption circuit 26 are stored on the memory chip. However, the decryption control circuit 24 and decryption circuit 26 may also be realized on a different chip to the memory chip. In this case, these chips are used as a chip set comprising a memory device and a decryption device. FIG. 11 shows the constitution of a memory system with such a chip set. The data output Dout of the semiconductor memory device 50 is supplied to the decryption circuit 26 of the decryption device 52, and the output data Dout is decrypted when the decryption circuit 26 is activated by the decryption control circuit 24. The decryption control circuit 24 and decryption circuit 26 are the same as those discussed above.

[0056] According to the present invention, the unauthorized reading and copying of contents stored in non-volatile semiconductor memory can be prevented. 

What is claimed is:
 1. A semiconductor memory having a function for preventing unauthorized reading, and comprising: a memory cell array for storing data; a decryption circuit for decrypting data read from the memory cell array with a prescribed computing process; and a decryption control circuit for activating said decryption circuit in response to a decryption command supplied from an outside at the time of a read operation.
 2. The semiconductor memory according to claim 1, wherein said decryption control circuit stores addresses subject to decryption supplied from the outside in response to said decryption command, and at the time of reading activates said decryption circuit when an address subject to reading matches said address subject to decryption, and deactivates the decryption circuit when the addresses do not match.
 3. The semiconductor memory according to claim 2, wherein said decryption control circuit erases said stored addresses subject to decryption in response to an exit command.
 4. The semiconductor memory according to claim 2, wherein said decryption control circuit stores a plurality of addresses subject to decryption, and erases a designated decryption address in response to an exit command.
 5. The semiconductor memory according to claim 1, wherein said decryption control circuit comprises a sector address memory for storing addresses subject to decryption supplied from the outside, and a address comparing circuit for comparing at the time of reading an address subject to reading with the address subject to decryption stored in said sector address memory, and activates said decryption circuit when the addresses match and deactivates the decryption circuit when the addresses do not match.
 6. The semiconductor memory according to claim 5,wherein said decryption control circuit further comprises an entry/exit control circuit which causes the address subject to decryption to be stored in said sector address memory in response to an entry command, causes said address comparing circuit to enter a decryption mode, causes the address subject to decryption stored by said sector address memory to be erased, and causes said address comparing circuit to exit said decryption mode.
 7. The semiconductor memory according to claim 1, wherein said decryption circuit decrypts data read from said memory cell array when activated, and does not decrypt data read from said memory cell array when inactivated.
 8. The semiconductor memory according to claim 1, wherein said decryption control circuit enters a decryption mode, in which said decryption circuit is activated, in response to said decryption command, and exits said decryption mode in response to an exit command.
 9. The semiconductor memory according to claim 1, wherein said decryption circuit decrypts some bits of said read data and does not decrypt the remaining bits when activated.
 10. The semiconductor memory according to claim 1, wherein said decryption circuit comprises a plurality of decryption operating circuits which, when activated, perform corresponding decryption operations according to a decryption selection signal included in the decryption command.
 11. A memory system having a function for preventing unauthorized reading, and comprising: semiconductor memory having a memory cell array for storing data; a decryption circuit for decrypting data read from said semiconductor memory according to a prescribed computing process; and a decryption control circuit for activating said decryption circuit in response to a decryption command at the time of a read operation.
 12. The memory system, according to claim 11, wherein said decryption control circuit stores addresses subject to decryption supplied from an outside in response to said decryption command, and at the time of reading activates said decryption circuit when an address subject to reading matches said stored address subject to decryption, and deactivates the decryption circuit when the addresses do not match. 